home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / benchmarks / itc / gcc / varargs.h.old < prev    next >
Encoding:
Text File  |  1989-08-30  |  584 b   |  24 lines

  1. #ifndef __GNUC__
  2. /* Use the system's macros with the system's compiler.  */
  3. #include "/sprite/att/lib/include/varargs.h"
  4. #else
  5.  
  6. /* These macros implement traditional (non-ANSI) varargs
  7.    for GNU C.  */
  8.  
  9. #define va_alist  _varargs
  10. #define va_dcl    int _varargs;
  11. #define va_list   char *
  12.  
  13. #define va_start(AP)  AP=(char *) &_varargs
  14. #define va_end(AP)
  15.  
  16. #define _va_rounded_size(TYPE)  \
  17.   (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
  18.  
  19. #define va_arg(AP, TYPE)                        \
  20.  (AP += _va_rounded_size (TYPE),                    \
  21.   *((TYPE *) (AP - _va_rounded_size (TYPE))))
  22.  
  23. #endif
  24.